package com.android.launcher3.manager;

import com.android.launcher3.annotation.ToDoByDeson;

import java.util.ArrayList;
import java.util.List;

@ToDoByDeson
public enum AudioManager {
    INSTANCE;

    private List<AudioListener> listeners = new ArrayList<>();

    @ToDoByDeson
    void play() {

    }

    @ToDoByDeson
    void stop() {

    }

    @ToDoByDeson
    void next() {

    }

    @ToDoByDeson
    void previous() {

    }

    void addListener(AudioListener audioListener) {
        listeners.add(audioListener);
    }

    void cancelListener(AudioListener audioListener) {
        listeners.remove(audioListener);
    }

    public static class AudioInfo {
        String audioName;
        String artist;
        long duration;
        String artistImage;
    }

    public interface AudioListener {

        void onStart(AudioInfo audioInfo);

        void onStop(AudioInfo audioInfo);

        void onProgress(AudioInfo audioInfo, long current);

    }

}




